<!doctype html>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>添加学生</title>
   <script language="javascript">
            function check()//表单验证
		    {
		        if(document.formAdd.txtName.value=="")
		        {
		            alert("帐号必填");
		            return false;
		        }
		        if(document.formAdd.txtPassword.value=="")
		        {
		            alert("密码必填");
		            return false;
		        }
                var phone=document.formAdd.txtPhone.value;
                if(!(/^1[0-9]\d{9}$/.test(phone))){ 
                    alert("电话格式有误，请重新输入");
                    return false; 
                }
                var email=document.formAdd.txtEmail.value;
                if(!(/^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/.test(email))){ 
                    alert("邮箱格式有误，请重新输入");
                    return false; 
                }
		        document.formAdd.submit();
		    }
        </script>
</head>
<body>
    <form name="formAdd" action="list.html" method="post">
    <div align="center">
        <table cellspacing="0" cellpadding="5" width="90%" border="0">
            <tr>
                <td bgcolor=''>
                    <table cellspacing="0" cellpadding="5" width="100%" border="1">
                        <tr bgcolor="#e4e4e4">
                            <td bgcolor='F5F9FF' height="22" align="center">
                                添加学生
                            </td>
                        </tr>
                        <tr>
                            <td height="22">
                                <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td class="tdbg">
                  
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
    	<td height="25" width="30%" align="right">帐号：</td>
    	<td height="25" width="*" align="left">
        	<input type="text" name="txtName"/>
          
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">密码：</td>
    	<td height="25" width="*" align="left">
            <input type="password" name="txtPassword"/></td>
        </td>
    </tr>
    <tr>
	<td height="25" width="30%" align="right">确认密码：</td>
	<td height="25" width="*" align="left">
		<input type="password" name="txtConfirmPassword"/>
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">姓名：</td>
    	<td height="25" width="*" align="left">
            <input type="text" name="txtTrueName"/>
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">性别：</td>
    	<td height="25" width="*" align="left">
        	<select name="ddlSex">
            	<option>男</option>
                <option>女</option>
            </select>
           
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">电话：</td>
    	<td height="25" width="*" align="left">
            <input type="text" name="txtTel"/>
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">邮箱：</td>
    	<td height="25" width="*" align="left">
            <input type="text" name="txtEmail"/>
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">生日：</td>
    	<td height="25" width="*" align="left">
        	<input type="text" name="txtBirthday" Width="70px"/>
           
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">照片：</td>
    	<td height="25" width="*" align="left">
        	<input type="file" name="fuPhoto"/>
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">班级：</td>
    	<td height="25" width="*" align="left">
        	<input type="radio" name="stuclass" />1班
            <input type="radio" name="stuclass" />2班
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">爱好：</td>
    	<td height="25" width="*" align="left">
        	<input type="checkbox" name="aihao" />看书
            <input type="checkbox" name="aihao" />打球
            <input type="checkbox" name="aihao" />玩游戏
        </td>
   </tr>
    <tr>
    	<td height="25" width="30%" align="right">个人简介：</td>
    	<td height="25" width="*" align="left">
        	<textarea cols="30" rows="5" ></textarea>
        </td>
   </tr>
   
</table>
            </td>
        </tr>
        <tr>
            <td class="tdbg" align="center" valign="bottom">
            	<input type="submit" value="注册" onclick="return check();">
                &nbsp;<a href="list.html">取消</a>
            </td>
        </tr>
    </table>
    <br />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    
    </form>
</body>
</html>
